<?php $this->load->view('header'); ?>
<?php $this->load->view('cuerpo'); ?>
<section id="dt_example">
    <div id="container">
        <table border="1" class="display" id="example">
            <thead>
            	<tr>
            		<th colspan="10" style="text-align: justify;"></th>
            	</tr>
                <tr>
                    <th>N° SOLICITUD</th>
                    <th>FECHA DE REGISTRO</th>
                    <th>RAZÓN SOCIAL</th>
                    <th>MONEDA</th>
                    <th>IGV</th>
                    <th>MARCA</th>
                    <th>MODELO</th>
                    <th>ESTADO</th>
                    <th>COMENTARIO</th>
                    <th>VER</th>
                </tr>
            </thead>
            <tbody>
                <?php
                    foreach ($lstCotizacion as $data) {
                        $codigo = '';
                        $numCaracteres = strlen($data->id_solicitud);
                        for ($iPos = 0; $iPos < $tamCodigo - $numCaracteres; $iPos++) {
                            $codigo .= '0';
                        }
                        $codigo .= $data->id_solicitud;
                ?>
                    <tr>
                        <td><?php echo $codigo ?></td>
                        <td><?php echo date("d/m/Y", strtotime($data->fecha_registro)) ?></td>
                        <td><?php echo $data->razon; ?></td>
                        <td><?php echo $data->nomMoneda ?></td>
                        <td>
                            <?php
                                if ($data->igv == 1) {
                                    echo STR_SI;
                                } else {
                                    echo STR_NO;
                                }
                            ?>
                        </td>
                        <td><?php echo $data->nomMarca ?></td>
                        <td><?php echo $data->nomModelo ?></td>
                        <td><?php echo $data->nomEstadoCot ?></td>
                        <td><?php echo $data->comentario ?></td>
                        <td class="center">
                            <a href="<? echo base_url();?>index.php/cotizacion/cotizar?id=<?= $data->id_cotizacion ?>&lectura=1">
                                <img src="<? echo base_url();?>images/ver.png" width="20" height="20" />
                            </a>
                        </td>
                    </tr>
                <?php
                    }
                ?>
            </tbody>
        </table>
    </div>
</section>
<?php $this->load->view('footer'); ?>